package com.project.class4_8.staticproxy;

public class ProxyLiu implements IEat{
    /**目标对象*/
    private IEat boss;
    public ProxyLiu(IEat boss){
        this.boss = boss;
    }

    @Override
    public void eat() {
        System.out.println("订餐");
        //执行目标对象的目标方法
        boss.eat();
        System.out.println("结帐、开发票");
    }

    @Override
    public void drink() {
        System.out.println("订餐");
        boss.drink();
        System.out.println("结帐，开发票");
    }
}
